namespace TradeFlow.Server.Models;

/// <summary>
/// 商业伙伴信息
/// </summary>
[SugarTable(nameof(JxPartner), "商业伙伴信息")]
public class JxPartner : EntityBase
{
    /// <summary>
    /// 类型（客户、供应商、物流）
    /// </summary>
    [Required, MaxLength(50)]
    [SugarColumn(ColumnDescription = "类型")]
    public string Type { get; set; }

    /// <summary>
    /// 名称
    /// </summary>
    [Required, MaxLength(100)]
    [SugarColumn(ColumnDescription = "名称")]
    public string Name { get; set; }

    /// <summary>
    /// 简称
    /// </summary>
    [MaxLength(50)]
    [SugarColumn(ColumnDescription = "简称", IsNullable = true)]
    public string ShortName { get; set; }

    /// <summary>
    /// 信用代码
    /// </summary>
    [MaxLength(50)]
    [SugarColumn(ColumnDescription = "信用代码", IsNullable = true)]
    public string SccNo { get; set; }

    /// <summary>
    /// 联系人
    /// </summary>
    [MaxLength(50)]
    [SugarColumn(ColumnDescription = "联系人", IsNullable = true)]
    public string Contact { get; set; }

    /// <summary>
    /// 联系电话
    /// </summary>
    [MaxLength(50)]
    [SugarColumn(ColumnDescription = "联系电话", IsNullable = true)]
    public string Phone { get; set; }

    /// <summary>
    /// 联系地址
    /// </summary>
    [MaxLength(500)]
    [SugarColumn(ColumnDescription = "联系地址", IsNullable = true)]
    public string Address { get; set; }

    /// <summary>
    /// 开票地址
    /// </summary>
    [MaxLength(500)]
    [SugarColumn(ColumnDescription = "开票地址", IsNullable = true)]
    public string InvAddress { get; set; }

    /// <summary>
    /// 开票电话
    /// </summary>
    [MaxLength(50)]
    [SugarColumn(ColumnDescription = "开票电话", IsNullable = true)]
    public string InvPhone { get; set; }

    /// <summary>
    /// 开户银行
    /// </summary>
    [MaxLength(100)]
    [SugarColumn(ColumnDescription = "开户银行", IsNullable = true)]
    public string Bank { get; set; }

    /// <summary>
    /// 银行账号
    /// </summary>
    [MaxLength(100)]
    [SugarColumn(ColumnDescription = "银行账号", IsNullable = true)]
    public string Account { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    [SugarColumn(ColumnDescription = "备注", IsNullable = true, ColumnDataType = StaticConfig.CodeFirst_BigString)]
    public string Note { get; set; }

    /// <summary>
    /// 附件
    /// </summary>
    [MaxLength(500)]
    [SugarColumn(ColumnDescription = "附件", IsNullable = true)]
    public string Files { get; set; }
}